<%@ page import="com.cisite.manager.Manager" %>
<g:set var="entityName" value="${message(code: 'manager.label', default: '增加管理员')}" />
<g:set var="male" value="${message(code: 'manager.sex.male.label', default: '男')}"/>
<g:set var="female" value="${message(code: 'manager.sex.female.label', default: '女')}"/>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'userName', 'error')} ">
	<label for="userName">
		<g:message code="manager.userName.label" default="登录名" />
	    <span class="required-indicator">*</span>
	</label>
	<g:textField name="userName" value="${managerInstance?.userName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'realName', 'error')} ">
	<label for="realName">
		<g:message code="manager.realName.label" default="姓名" />
	    <span class="required-indicator">*</span>
	</label>
	<g:textField name="realName" value="${managerInstance?.realName}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'password', 'error')} ">
	<label for="password">
		<g:message code="manager.password.label" default="密码" />
	    <span class="required-indicator">*</span>
	</label>
	<g:textField name="password" value="${managerInstance?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'passwordAgain', 'error')} ">
	<label for="passwordAgain">
		<g:message code="manager.passwordAgain.label" default="确认密码" />
	    <span class="required-indicator">*</span>
	</label>
	<g:textField name="passwordAgain" value="${managerInstance?.password}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'sex', 'error')} required">
	<label for="sex">
		<g:message code="manager.sex.label" default="性别" />
		<span class="required-indicator">*</span>
	</label>
    <g:select name="sex" optionKey="sex" optionValue="queryShow"
       from="${[[sex:'1',queryShow:"${male}"],[sex:'2',queryShow:"${female}"]]}"  value="${fieldValue(bean: managerInstance, field: 'sex')}" >
    </g:select>  
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'email', 'error')} ">
	<label for="email">
		<g:message code="manager.email.label" default="Email" />
	</label>
	<g:textField name="email" value="${managerInstance?.email}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'qq', 'error')} ">
	<label for="qq">
		<g:message code="manager.qq.label" default="qq" />
	</label>
	<g:textField name="qq" value="${managerInstance?.qq}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'birthday', 'error')} ">
	<label for="birthday">
		<g:message code="manager.birthday.label" default="生日" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="birthday" precision="day"  value="${managerInstance?.birthday}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: managerInstance, field: 'introduce', 'error')} ">
	<label for="introduce">
		<g:message code="manager.introduce.label" default="自我介绍" />
	</label>
	<g:textArea name="introduce" value="${managerInstance?.introduce}"/>
</div>





